<!DOCTYPE html>
<html lang="en">
  <head>
    <title>BodySpec Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../../js/jquery.min.js" defer></script>
    <script src="../../js/jazzy.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/swift/Class/BodySpec" class="dashAnchor"></a>
    <a title="BodySpec Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../../index.html"> Docs</a> (83% documented)</p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../../index.html"> Reference</a>
        <img id="carat" src="../../img/carat.png" />
        BodySpec Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
          <a href="../../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../../Classes/AJAXObjectDriver.html">AJAXObjectDriver</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/Bytes.html">Bytes</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/CURL.html">CURL</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes.html#/s:C10PerfectLib6Cookie">Cookie</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/Dir.html">Dir</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/Encoding.html">Encoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/FastCGIServer.html">FastCGIServer</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/File.html">File</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/HTTPServer.html">HTTPServer</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/ICU.html">ICU</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/JSONArrayType.html">JSONArrayType</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/JSONDecode.html">JSONDecode</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/JSONDictionaryType.html">JSONDictionaryType</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/JSONEncode.html">JSONEncode</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/JSONNull.html">JSONNull</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes.html#/s:C10PerfectLib10LogManager">LogManager</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/MimeReader.html">MimeReader</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/MoustacheEvaluationContext.html">MoustacheEvaluationContext</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/MoustacheEvaluationOutputCollector.html">MoustacheEvaluationOutputCollector</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/MoustacheGroupTag.html">MoustacheGroupTag</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/MoustacheParser.html">MoustacheParser</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/MoustachePartialTag.html">MoustachePartialTag</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/MoustachePragmaTag.html">MoustachePragmaTag</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/MoustacheTag.html">MoustacheTag</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/MoustacheTemplate.html">MoustacheTemplate</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/NetNamedPipe.html">NetNamedPipe</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/NetTCP.html">NetTCP</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/NetTCPSSL.html">NetTCPSSL</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/PageHandlerRegistry.html">PageHandlerRegistry</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/PerfectObject.html">PerfectObject</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/PerfectObjectHandler.html">PerfectObjectHandler</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/PerfectServer.html">PerfectServer</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/SQLite.html">SQLite</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/SQLiteStmt.html">SQLiteStmt</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/SessionManager.html">SessionManager</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/SysProcess.html">SysProcess</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/UTF16Encoding.html">UTF16Encoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/UTF8Encoding.html">UTF8Encoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/WebRequest.html">WebRequest</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Classes/WebResponse.html">WebResponse</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
          <a href="../../Global Variables.html">Global Variables</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../../Global Variables.html#/s:v10PerfectLib17PERFECT_LIBRARIESSS">PERFECT_LIBRARIES</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Global Variables.html#/s:v10PerfectLib10SQLITE_DBSSS">SQLITE_DBS</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
          <a href="../../Enums.html">Enums</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../../Enums/HandlerAction.html">HandlerAction</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Enums/JSONError.html">JSONError</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Enums/MoustacheError.html">MoustacheError</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Enums/PerfectError.html">PerfectError</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Enums/SQLiteError.html">SQLiteError</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Enums/SessionResult.html">SessionResult</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
          <a href="../../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../../Extensions/Closeable.html">Closeable</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Extensions/HandlerAction.html">HandlerAction</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Extensions/PerfectObjectDriver.html">PerfectObjectDriver</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Extensions/String.html">String</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Extensions/UnicodeScalar.html">UnicodeScalar</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
          <a href="../../Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../../Functions.html#/s:F10PerfectLib10FileStderrFT_CS_4File">FileStderr()</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Functions.html#/s:F10PerfectLib9FileStdinFT_CS_4File">FileStdin()</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Functions.html#/s:F10PerfectLib10FileStdoutFT_CS_4File">FileStdout()</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Functions.html#/s:F10PerfectLib10empty_uuidFT_TVSs5UInt8S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0__">empty_uuid()</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Functions.html#/s:F10PerfectLib11random_uuidFT_TVSs5UInt8S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0_S0__">random_uuid()</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
          <a href="../../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../../Protocols/Closeable.html">Closeable</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Protocols/PageHandler.html">PageHandler</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Protocols/PerfectObjectDriver.html">PerfectObjectDriver</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Protocols/WebConnection.html">WebConnection</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
          <a href="../../Structs.html">Structs</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../../Structs/GenerateFromPointer.html">GenerateFromPointer</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Structs/SessionConfiguration.html">SessionConfiguration</a>
              </li>
              <li class="nav-group-task">
                <a href="../../Structs.html#/s:V10PerfectLib20SocketFileDescriptor">SocketFileDescriptor</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>BodySpec</h1>
              <div class="declaration">
                <div class="Swift">
                  <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">BodySpec</span></code></pre>

                </div>
              </div>
            <p>This class represents a single part of a multi-part POST submission</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vCC10PerfectLib10MimeReader8BodySpec9fieldNameSS"></a>
                    <a name="//apple_ref/swift/Property/fieldName" class="dashAnchor"></a>
                    <a class="token" href="#/s:vCC10PerfectLib10MimeReader8BodySpec9fieldNameSS">fieldName</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The name of the form field.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="Swift">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">fieldName</span> <span class="o">=</span> <span class="s">""</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vCC10PerfectLib10MimeReader8BodySpec10fieldValueSS"></a>
                    <a name="//apple_ref/swift/Property/fieldValue" class="dashAnchor"></a>
                    <a class="token" href="#/s:vCC10PerfectLib10MimeReader8BodySpec10fieldValueSS">fieldValue</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The value for the form field.
Having a fieldValue and a file are mutually exclusive.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="Swift">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">fieldValue</span> <span class="o">=</span> <span class="s">""</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vCC10PerfectLib10MimeReader8BodySpec11contentTypeSS"></a>
                    <a name="//apple_ref/swift/Property/contentType" class="dashAnchor"></a>
                    <a class="token" href="#/s:vCC10PerfectLib10MimeReader8BodySpec11contentTypeSS">contentType</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The content-type for the form part.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="Swift">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">contentType</span> <span class="o">=</span> <span class="s">""</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vCC10PerfectLib10MimeReader8BodySpec8fileNameSS"></a>
                    <a name="//apple_ref/swift/Property/fileName" class="dashAnchor"></a>
                    <a class="token" href="#/s:vCC10PerfectLib10MimeReader8BodySpec8fileNameSS">fileName</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The client-side file name as submitted by the form.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="Swift">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">fileName</span> <span class="o">=</span> <span class="s">""</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vCC10PerfectLib10MimeReader8BodySpec8fileSizeSi"></a>
                    <a name="//apple_ref/swift/Property/fileSize" class="dashAnchor"></a>
                    <a class="token" href="#/s:vCC10PerfectLib10MimeReader8BodySpec8fileSizeSi">fileSize</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The size of the file which was submitted.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="Swift">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">fileSize</span> <span class="o">=</span> <span class="mi">0</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vCC10PerfectLib10MimeReader8BodySpec11tmpFileNameSS"></a>
                    <a name="//apple_ref/swift/Property/tmpFileName" class="dashAnchor"></a>
                    <a class="token" href="#/s:vCC10PerfectLib10MimeReader8BodySpec11tmpFileNameSS">tmpFileName</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The name of the temporary file which stores the file upload on the server-side.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="Swift">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">tmpFileName</span> <span class="o">=</span> <span class="s">""</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vCC10PerfectLib10MimeReader8BodySpec4fileGSqCS_4File_"></a>
                    <a name="//apple_ref/swift/Property/file" class="dashAnchor"></a>
                    <a class="token" href="#/s:vCC10PerfectLib10MimeReader8BodySpec4fileGSqCS_4File_">file</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The File object for the local temporary file.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="Swift">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">file</span><span class="p">:</span> <span class="kt">File</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FCC10PerfectLib10MimeReader8BodySpec7cleanupFS1_FT_T_"></a>
                    <a name="//apple_ref/swift/Method/cleanup()" class="dashAnchor"></a>
                    <a class="token" href="#/s:FCC10PerfectLib10MimeReader8BodySpec7cleanupFS1_FT_T_">cleanup()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Clean up the BodySpec, possibly closing and deleting any associated temporary file.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="Swift">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">cleanup</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2015 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2015-11-04)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.3.2</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
